 <%--
 *  File:   LendSlipMain.jsp
 *  Desc:	main page for lend slip
 *
 *  Date		         Author		      Changes
 *  2005-6-3	  andyyang		  Created
 *
 *  Copyright (C) 2000 - 2005 Oval Technologies, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>
<%
  //init param
  String privilegeCode = "50802";
  String strModuleName = "COM";
  String contextPath = request.getContextPath();
%>
<%@ include file="/inc/CommonHeader.inc" %>

<html>
<head>
<title>LendSlipMain</title>
<PageFlow:CheckPageFlow pageName="LendSlipMain"/>
<%@ include file="/inc/CatchError.inc" %>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="<%=contextPath%>/css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="<%=contextPath%>/css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="<%=contextPath%>/js/ScriptLib.js"></script>
<%@ include file="/inc/NewCalendar.inc" %>

<%--  edit page related functions   --%>
<%if(!isView){%><script language="JavaScript">
function page_reload()
{
    formatDate(cform);
    cform.action = "LendSlipMain.jsp";
	cform.target = "_self";
	isRunning = true;
	cform.submit();
}
function page_save()
{
    if(!checkForm(cform))   return;
    formatDate(cform);
	cform.actionname.value = "save";
	cform.target = "_self";
	isRunning = true;
	cform.submit();
}
</script><%}%>

<%--  other functions   --%>
<script language="JavaScript">

</script>
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="overflow: auto;">
<form name="cform" method="post" action="<%=contextPath%>/Dispatcher">
    <input type="hidden" name="pagename" value="LendSlipMain">
    <input type="hidden" name="actionname">

<table border=0 cellpadding=0 cellspacing=0 width="100%">
  <tr>
    <td valign=top>
      <table border=0 cellpadding=1 cellspacing=0 width="100%">
        <tr>
          <td bgcolor=#000000 style="PADDING-BOTTOM: 1px; PADDING-LEFT: 1px; PADDING-RIGHT: 1px; PADDING-TOP: 0px">
            <table bgcolor=#000000 border=0 cellpadding=0 cellspacing=0 width="100%">
              <tr>
                <td  bgcolor=#ffffff style="PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; PADDING-TOP: 3px" valign="top">
                  <div id=div2 style="HEIGHT: 415px; OVERFLOW: auto;">
                    <table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" align="center" width="100%" cellpadding="1">

<%--    top function buttons    --%>
<% if(!isView){%>
                      <tr>
                        <td colspan="4" class="td_right" height="18">
                          <a onclick="page_save()"><custom:button type="2" label="L_Save" imgsrc="save_btn.gif" border="0" /></a>
                        </td>
                      </tr>
<%}%>

<%--    main trs    --%>
                      <tr>
                        <td width="150" class="<%=JspHelper.filterNull(needClass)%>" id="autocode"> <%=label.getLabelName("L_LendSlipCode")+label.getLabelName("L_Colon")%></td>
                        <td width="300"> <custom:autocode name="maininfo" property="lendslipcode" table="lendslip" label="L_LendSlipCode"/></td>
                        <td width="150" class="<%=JspHelper.filterNull(needClass)%>" ><%=label.getLabelName("L_DocDate")+label.getLabelName("L_Colon")%></td>
                        <td> <custom:text readonly="true" name="maininfo" property="slipdate" dataType="date" dataFormatName="dateformat"  size="20" command="notnull" label="L_DocDate"/>
                        <a onclick="c.show(this,'cform.slipdate','<%=JspHelper.filterNull( session.getAttribute("dateformat") )%>');"><custom:button type="3" label="L_Asterisk" imgsrc="Time.gif" border="0"/></a> </td>
                      </tr>
                      <tr>
                        <td class="<%=JspHelper.filterNull(needClass)%>"> <%=label.getLabelName("L_LendOrgName")+label.getLabelName("L_Colon")%></td>
                        <td > <custom:select name="maininfo" property="partnerid" optionsName="allpartners" optionValueKey="orgid" optionInnerTextKey="orgname" command="notnull" label="L_LendOrgName" defaultValue="--------" defaultValueCost=" " onchange="page_reload()" /></td>
                        <td  class="<%=JspHelper.filterNull(needClass)%>" ><%=label.getLabelName("L_LendDeptName")+label.getLabelName("L_Colon")%></td>
                        <td> <custom:select name="maininfo" property="deptid" optionsName="alldepts" optionValueKey="deptid" optionInnerTextKey="deptname" command="notnull" label="L_LendDeptName" defaultValue="--------" defaultValueCost=" " onchange="page_reload()"/> </td>
                      </tr>
                      <tr>
                        <td class="<%=JspHelper.filterNull(needClass)%>"> <%=label.getLabelName("L_LendEmployeeName")+label.getLabelName("L_Colon")%></td>
                        <td > <custom:select name="maininfo" property="employeeid" optionsName="allemployees" optionValueKey="employeeid" optionInnerTextKey="employeename" command="notnull" label="L_LendEmployeeName" defaultValue="--------" defaultValueCost=" " /></td>
                        <td class="td-text" ><%=label.getLabelName("L_Maker")+label.getLabelName("L_Colon")%></td>
                        <td> <custom:write name="maininfo" property="makername" nbsp="true" /></td>
                      </tr>
                      <tr>
                        <td class="td-text"> <%=label.getLabelName("L_CreateDate")+label.getLabelName("L_Colon")%></td>
                        <td > <custom:write name="maininfo" property="createdate" dataType="date"  dataFormatName="dateformat" nbsp="true"/></td>
                        <td class="td-text" > LendStatus</td>
                        <td> <custom:selectdic property="status" dictType="Status" valueCriteria="28,41" /></td>
                      </tr>
                      <tr>
                        <td class="td-text"> <%=label.getLabelName("L_Comments")+label.getLabelName("L_Colon")%></td>
                        <td colspan="3" > <custom:textarea name="maininfo" property="comments" cols="45" rows="4"/></td>
                      </tr>

<%--    form hidden elements    --%>
                      <tr>
                        <td style="display:none">
            	            <custom:hidden name="maininfo" property="lendslipid"/>
                            <custom:hidden name="maininfo" property="createdate"/>
            	            <custom:hidden name="maininfo" property="status"/>
                            <custom:hidden name="maininfo" property="maker"/>
                            <custom:hidden name="maininfo" property="orgid"/>
                        </td>
                      </tr>

                    </table>
                  </div>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</form>
</body>

</html>
